package com.lanyan.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import com.lanyan.system.domain.Orders;
import com.lanyan.system.domain.vo.DataDto;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 *
 * @author lanyan
 * @date 2024-11-26
 */
public interface OrdersMapper extends BaseMapper<Orders>
{
    /**
     * 查询订单
     *
     * @param ordersId 订单主键
     * @return 订单
     */
    public Orders selectOrdersByOrdersId(Long ordersId);

    /**
     * 查询订单列表
     *
     * @param orders 订单
     * @return 订单集合
     */
    public List<Orders> selectOrdersList(Orders orders);

    /**
     * 新增订单
     *
     * @param orders 订单
     * @return 结果
     */
    public int insertOrders(Orders orders);

    /**
     * 修改订单
     *
     * @param orders 订单
     * @return 结果
     */
    public int updateOrders(Orders orders);

    /**
     * 删除订单
     *
     * @param ordersId 订单主键
     * @return 结果
     */
    public int deleteOrdersByOrdersId(Long ordersId);

    /**
     * 批量删除订单
     *
     * @param ordersIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOrdersByOrdersIds(Long[] ordersIds);

    public List<DataDto> getData(
            @Param("estateId") Long estateId,
            @Param("buildingId") Long buildingId,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime
    );
}
